﻿using System;
using ExFlash.Records;

namespace ExFlash.Actions
{
    public class ActionGoToLabel : ActionRecord
    {
        private readonly int _swfVersion;

        public StringRecord Label
        {
            get;
            private set;
        }

        public ActionGoToLabel(ushort len, int version)
            : base((byte)ActionCodes.ActionGoToLabel, len)
        {
            _swfVersion = version;
        }

        public override void SwfDeserialize(BinaryBitReader reader)
        {
            Label = new StringRecord(_swfVersion);
            Label.SwfDeserialize(reader);
        }

        public override void SwfSerialize(byte[] arr, ref int offset)
        {
            throw new NotImplementedException();
        }
    }
}

